using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Diagnostics;
using System.Windows.Forms;

namespace Janus.NorthwindDemo2007
{
	public partial class RecurrenceOptionDialog : System.Windows.Forms.Form
	{

		protected override void OnLoad(System.EventArgs e)
		{
			base.OnLoad(e);
			NorthwindApp.MainForm.VisualStyleManager1.AddControl(this, true);
		}
		public void ShowRecurrenceOptionDialog(string appText, bool deleteForm)
		{
			if (deleteForm)
			{
				this.lblInfo.Text = "Do you want to delete all occurrences of the recurring appointment '" + appText + "', or just this one?";
				this.rdbOccurrence.Text = "Delete this occurrence";
				this.rdbSeries.Text = "Delete the series";
			}
			else
			{
				this.lblInfo.Text = "'" + appText + "' is a recurring appointment. Do you want to open only this occurrence or the series?";
				this.rdbOccurrence.Text = "Open this occurrence";
				this.rdbSeries.Text = "Open the series";
				this.Text = "Open Recurring Item";
			}
			this.ShowDialog();
		}

		private void rdbSeries_CheckedChanged(object sender, System.EventArgs e)
		{
			this.ApplyToTheSeries = rdbSeries.Checked;
		}

		private bool mApplyToTheSeries = false;
		public bool ApplyToTheSeries
		{
			get
			{
				return mApplyToTheSeries;
			}
			set
			{
				mApplyToTheSeries = value;
			}
		}

	}

} //end of root namespace